<?php
class Default_Form_Login extends Zend_Form{

	public function init(){
		
		//Thiết lập ngon ngữ
		$translate = Zend_Registry::get('Zend_Translate');
		
		$this->setAttrib('id', 'frm-login');
		
		//email
		$email = $this->createElement('text', 'email');
		$email->setLabel($translate->translate('Email'));
		$email->setRequired(true);
		$email->addValidator('emailAddress',false);
		
		//Mật khẩu
		$password = $this->createElement('password', 'password');
		$password->setLabel($translate->translate('Mật khẩu'));
		$password->setRequired(true);
		//submit
		
		$submit = $this->createElement('submit', 'submit');
		$submit->setLabel($translate->translate('Đăng nhập'));
		$this->addElements(array(
				$email,
				$password,
				$submit
		));
	}
}